<style>
  .data-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    background-color: #fff;
    margin-bottom: 20rpx;
  }

  .data-item {
    width: 250rpx;
    box-sizing: border-box;
    height: 100rpx;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1rpx solid #eee;
    padding: 20rpx 0rpx;
  }

  .item-body {
    width: 250rpx;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .item-body-0n {
    border-right: 1rpx solid #eee;
  }

  .item-body-1n {
    border-right: 1rpx solid #eee;
  }

  .info-text {
    font-size: 24rpx;
    color: #999;
  }

  .total-text {
    font-size: 28rpx;
    color: #333;
  }
</style>

<template>
  <view class="data-wrapper">
    <view class="data-item" v-for="(item, index) in items">
      <view :class="'item-body item-body-' + index % 3 + 'n'">
        <text class="total-text">{{item.total}}</text>
        <text class="info-text">{{item.text}}</text>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        // mock data
        items: Array.from({ length: 12 }).map((x, index) => {
          return {
            total: Math.floor(Math.random() * 1000),
            text: ['昨日成交金额', '今日总访客', '待评价'][Math.floor(Math.random() * 3)]
          }
        })
      }
    },
    methods: {
      onInput(event) {
        console.log(event.detail.value)
      }
    }
  };
</script>
